// 引入 react 依赖
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { Text, View, Platform, StatusBar, InteractionManager, TouchableOpacity } from 'react-native';

// 引入第三方依赖
import _ from 'lodash';
import pureRender from 'pure-render-decorator';

// antd 按需加载
import { } from '@ant-design/react-native';

// 引入 处理数据 所需文件
import { } from './module.js'

// 引入样式
import Styles from './style.js';

// 引入公用组件
import { } from '../../components/index.js'

// 引入专用组件
// import { } from './components'

// 引入专用组件
import { ScreenWidth, ScreenHeight } from '../../util/utils'

class Status extends Component {
	static propTypes = {

	}

	constructor(props) {
		super(props)
		this.state = {}
	}

	render() {
		const { backgroundColor, style, barProps, type, statusHeight } = this.props
		let barStyle = {
			barStyle: 'dark-content',
			backgroundColor: 'transparent'
		}
		switch (type) {
			case 'dark-content':
				barStyle = {
					barStyle: 'dark-content',
					backgroundColor: 'transparent'
				}
				break;
			case 'light-content':
				barStyle = {
					barStyle: 'light-content',
					backgroundColor: 'transparent'
				}
				break;
			default:
				barStyle = {
					barStyle: 'dark-content',
					backgroundColor: 'transparent'
				}
				break;
		}

		return (
			<View style={[{ height: statusHeight }, style, { backgroundColor: backgroundColor || barStyle.backgroundColor }]}>
				<StatusBar
					backgroundColor={barStyle.backgroundColor}
					translucent={true}
					barStyle={barStyle.barStyle}
				/>
			</View >
		)
	}
}

export default connect(({ statusHeight }) => ({
	statusHeight,
  }))(pureRender(Status))
  